﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Kugar.Core.Configuration;
using Kugar.Core.ExtMethod;
using Kugar.Core.Web;
using Kugar.Web.Wechat;
using Kugar.Web.Wechat.Entities;
using Kugar.Web.Wechat.Enums;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Filters;
using HttpContext = Microsoft.AspNetCore.Http.HttpContext;

namespace Kugar.DC.Car.Web.Areas.Wechat.Helpers
{
    public class MPOAuthHandler: IMPOAuthWithSchemeHandler
    {
        //private static string _defaultUserID = "";

        static MPOAuthHandler()
        {
            //_defaultUserID = CustomConfigManager.Default["DefaultUserID"].ToStringEx();
        }

        public (string appID, string appSerect, string token) MPGetter(HttpContext context, ActionDescriptor actionDescriptor)
        {
            return (CustomConfigManager.Default["Wechat:MP:AppID"], CustomConfigManager.Default["Wechat:MP:AppSerect"],
                CustomConfigManager.Default["Wechat:MP:Token"]);
        }

        public async Task OnWechatAuthorityCallbackAsync(string appID, WechatUserOAuth user, HttpContext context)
        {
            
        }

    }
}
